package org.larkdoc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 测试使用demo
 * 
 * @author  zhangpeijun[zhangpeijun1024@qq.com]
 * @version  [v1.0.1, 2017年10月17日]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
@Controller
@Deprecated
public class Demo {
    
    @RequestMapping("/demo")
    public String hello() {
        return "hello spring boot : ";
    }
    
    @RequestMapping("/demo/createDoc")
    public String createDoc() {
        return "createDoc";
    }
    
    @RequestMapping("/demo/getmd")
    @ResponseBody
    public String getDetail() {
        StringBuffer sb = new StringBuffer();
        sb.append("# Editor.md")
            .append("![](https://pandao.github.io/editor.md/images/logos/editormd-logo-180x180.png)")
            .append(System.getProperty("line.separator", "\n")).append("**目录 (Table of Contents)**")
            .append(System.getProperty("line.separator", "\n")).append("[TOC]")
            .append(System.getProperty("line.separator", "\n")).append("# Heading 1")
            .append(System.getProperty("line.separator", "\n")).append("## Heading 2").append("### Heading 3")
            .append("# Heading 6 link [Heading link](https://github.com/pandao/editor.md \"Heading link\")")
            .append("#### 标题（用底线的形式）Heading (underline)");
        return sb.toString();
    }
}
